<template>
  <el-container class="home-container">
    <!--   头部区   -->
    <el-header>
      <div>
        <img src="../assets/logo.jpeg" width="50px" alt="">
        <span>家庭网络DDNS服务管理</span>
      </div>
      <el-button type="info" @click="logout">logout</el-button>
    </el-header>
    <el-container>
      <AsideMenu></AsideMenu>
      <el-container>
        <el-main>
          <router-view></router-view>
        </el-main>
        <el-footer>Footer</el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
import AsideMenu from '@/components/AsideMenu'
export default {
  name: 'Home',
  components: { AsideMenu },
  methods: {
    logout () {
      window.sessionStorage.clear()
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
  .home-container{
    height: 100%;
  }
  .el-header{
    background-color: #242f43;
    display: flex;
    justify-content: space-between;
    padding-left: 0;
    align-items: center;
    color: #fff;
    font-size: 20px;
    > div {
      display: flex;
      align-items: center;
      span {
        margin-left: 15px;
      }
    }
  }
  .el-aside{
    background-color: #324158;
  }
  .el-main{
    background-color: #f0f0f0;
  }

</style>
